using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using Core.GameObjects.Entities;
using Core;
using Core.GameObjects.Items;
using Core.Mapping;
using Core.GameObjects;
using Microsoft.Xna.Framework.Graphics;
using Core.Graphics;

namespace WorldEditor.Characters
{
    public partial class CharacterBuilder : CanvasPanel
    {
        Player _Player;

        public CharacterBuilder()
        {
            _Player = new Player(0, "Peter");

            InitializeComponent();

            SetupPlayer();
        }

        private void SetupPlayer()
        {
            
            //Load testing TileSets/Body Parts for Player
            //string CharPath = TileWorld.CurrentWorld.diCharacters.FullName;

            //_Player.Body = new Item(10, "Body", 1.0f, 1.0f, ItemType.Armor,
            //    new TileSet(0, Texture2D.FromFile(GraphicsDevice, CharPath + @"\Body\defaultbodycolor.png"),
            //    "", 24, 32, 0, 0));

            //_Player.Body.SetDrawColor(Microsoft.Xna.Framework.Graphics.Color.Green);

            //_Player.Face = new Item(10, "Face", 1.0f, 1.0f, ItemType.Armor,
            //    new TileSet(0, Texture2D.FromFile(GraphicsDevice, CharPath + @"\Face\face1.png"),
            //    "", 24, 32, 0, 0));

            //_Player.Hair = new Item(10, "Hair", 1.0f, 1.0f, ItemType.Armor,
            //    new TileSet(0, Texture2D.FromFile(GraphicsDevice, CharPath + @"\Hair\whitehair5.png"),
            //    "", 24, 32, 0, 0));

            //_Player.Hair.SetDrawColor(Microsoft.Xna.Framework.Graphics.Color.Blue);

            //_Player.TempWorn = new Item(10, "Clothes", 1.0f, 1.0f, ItemType.Armor,
            //    new TileSet(0, Texture2D.FromFile(GraphicsDevice, CharPath + @"\Back\whitecloak.png"),
            //    "", 24, 32, 0, 0));

            //_Player.TempWorn.SetDrawColor(Microsoft.Xna.Framework.Graphics.Color.DarkRed);

            //_Player.AddItems();

            //_Player.RotateObject(Rotation.Down);
        }

        protected override void Draw()
        {
            _Player.Draw(spriteBatch, new Microsoft.Xna.Framework.Point(0,0));

            base.Draw();
        }
    }
}
